package net.ocps.tchs.soap.event.events;

import net.ocps.tchs.soap.Main;
import net.ocps.tchs.soap.entity.Entity;
import net.ocps.tchs.soap.event.EventA;

public class JumpEvent extends EventA {

	public JumpEvent() {
		
	}
	
	@Override
	public void process(Entity e) {
		try {
			if( e.body.getLinearVelocity().y == 0.0f ) {
				e.setY( 90.0f );
				e.queueEvent( new FollowEvent( Main.entitys.get( 0 ) ) );
			}
		} catch( Exception er ) {
			
		}
	}

}
